package com.example.administrator.boxuegu.utils;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Utils {
    public static String md5(String text){
        MessageDigest digest = null;
        try {
            digest=MessageDigest.getInstance("md5");
            byte[] result=digest.digest(text.getBytes());
            return result.toString();
        }catch (NoSuchAlgorithmException e){
            e.printStackTrace();
            return "";
        }

    }
}
